package com.report.common;

public enum DataSetType {
    SQL(0), JSON(1), TEXT(2);

    private final int code;

    DataSetType(int code) {
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public static DataSetType get(int code) {
        switch (code) {
            case 1:
                return DataSetType.JSON;
            case 2:
                return DataSetType.TEXT;
            default:
                return DataSetType.SQL;
        }
    }
}
